package com.ali.framework.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Smile
 * @Date: 2023/12/20/13:50
 * @Description:
 */
@RestController
public class SentinelController {

    /**
     * 测试限流规则
     * @return
     */
    @RequestMapping("/test")
    public String test(){
        return "test";
    }

    /**
     * 测试熔断规则
     * @return
     */
    @RequestMapping("/testA")
    public String testA(){
        try {
            Thread.sleep(1000);
        }catch (Exception e){
            e.printStackTrace();
        }
        return "testA";
    }
}
